﻿/***********************************************************************
 * <copyright file="InventorysPresenter.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   BangNC
 * Email:    BangNC@buca.vn
 * Website:
 * Create Date: Thursday, March 13, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Collections.Generic;
using WindowsForms.AOnline.View.Dictionary;
using WindowsForms.AOnline.View.Inventory;


namespace WindowsForms.AOnline.Presenter.Inventory.InputInventory 
{
    public class InputInventoriesPresenter : Presenter<IItemTransactionsView>  
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PaymentVouchersPresenter"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        public InputInventoriesPresenter(IItemTransactionsView view)
            : base(view)
        {
        }

        public int GetPageSize(int refTypeId)
        {
            return Model.GetPageSizeItemTransactions(refTypeId);
        }

        /// <summary>
        /// Displays the specified reference type identifier.
        /// </summary>
        /// <param name="refTypeId">The reference type identifier.</param>
        public void Display(int refTypeId,int page)
        {
            View.ItemTransactions = Model.GetItemTransactionVoucherByRefTypeId(refTypeId, page);
        }
    }
}
